package com.kb.design.enums;

import com.google.common.base.Objects;

/**
 * @Auther:chenzx
 * @Date:2024-02-26
 * @Description:审核类型
 */
public enum UserRole {

    PAGE_ENGINEERS("pageEngineers", "封装工程师"),
    PAGE_COMPETENT("pageCompetent", "封装主管"),
    DESIGN_COMPETENT("designCompetent", "设计主管"),
    DESIGN_ENGINEERS("designEngineers", "设计工程师"),
    VALOR("valorEngineers", "Valor工程师"),
    ADMIN("admin", "管理员"),
    CUSTOMER_SERVICE("customerService", "客服");


    private String key;
    private String value;
    // 构造方法
    private UserRole(String key, String value) {
        this.key = key;
        this.value = value;
    }
    // 普通方法
    public static String getValue(String key) {
        for (UserRole c : UserRole.values()) {
            if (Objects.equal(key , c.getKey())) {
                return c.value;
            }
        }
        return null;
    }
    // get set 方法
    public void setKey(String key) {
        this.key = key;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
